package ${pPackage}.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Description 页面跳转统一配置
 * @Author ${author}
 * @Date ${createDate}
 */
@Configuration
public class MyWebMvcConfigurer implements WebMvcConfigurer {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/admin").setViewName("admin");
        registry.addViewController("/index").setViewName("index");
         <#list htmlTables as htmlTable>
        registry.addViewController("/${htmlTable.tableNameExt}").setViewName("${htmlTable.tableNameExt}");
        registry.addViewController("/${htmlTable.tableNameExt}Detail").setViewName("${htmlTable.tableNameExt}Detail");
         </#list>
    }
}